package com.object.module.cbb.frontEnd;

import com.object.configuration.utils.PageUtils;
import com.object.configuration.utils.Q;
import com.object.module.cbb.entity.CbbNoticeEntity;
import com.object.module.cbb.service.CbbNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


/**
 * 通知
 *
 * @author 小🌤
 * @email 1578442339@qq.com
 * @date 2022-01-07 14:01:01
 */
@RestController
@RequestMapping("/frontend/notice")
public class FrontEndCbbNoticeController {
    @Autowired
    private CbbNoticeService cbbNoticeService;

    /**
     * 全部
     */
    @RequestMapping("/all")
    public Q all() {
        List<CbbNoticeEntity> list = cbbNoticeService.listAll();
        return Q.ok().put("data", list);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{neId}")
    public Q info(@PathVariable("neId") Integer neId) {
        CbbNoticeEntity cbbNotice = cbbNoticeService.getById(neId);
        return Q.ok().put("cbbNotice", cbbNotice);
    }


}
